package pack;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner  sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int n = sc.nextInt();
			List<Integer> list = new ArrayList<>();
			for(int i = 0; i < n; i++)
				list.add(sc.nextInt());
			int m = sc.nextInt();
			for(int k = 0; k < m; k ++) {
				Integer val = sc.nextInt();
				if(list.contains(val)) {
					System.out.println("Yes");
				}else
					System.out.println("No");
				
			}
		}
		sc.close();
	}

}
